<%@tag description="Overall Page template" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
  	<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
  	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  		<link rel="stylesheet" type="text/css" href="/MDSI_Web/Static/Css/style.css" />
  		<title>Gestion des Absences</title>
	</head>
  	<body>
	  	<div id="wrapper">
		    <header id="main_header">
		    	<img id="logo" src="/MDSI_Web/Static/Img/logo_insa.png" alt="Logo INSA" />
		      <h1>Gestion des absences</h1>
		      	<nav id="main_menu">
			    	<ul>
			    		<c:choose>
			    			<c:when test="${not empty sessionScope['user']}" >
			    				<li><a href="${pageContext.request.contextPath}/Disconnection">Déconnnexion</a></li>
			    				<li><a href="${pageContext.request.contextPath}/User">Profil</a></li>
			    				<li>
			    				<c:choose>
			    					<c:when test="${sessionScope['user'].class.name == 'com.mdsi.models.Student'}">
			    						<a href="${pageContext.request.contextPath}/User/Student">Etudiant</a>
			    					</c:when>
			    					<c:when test="${sessionScope['user'].class.name == 'com.mdsi.models.Teacher'}">
			    						<a href="${pageContext.request.contextPath}/User/Teacher">Enseignant</a>
			    					</c:when>
			    					<c:when test="${sessionScope['user'].class.name == 'com.mdsi.models.Secretary'}">
			    						<a href="${pageContext.request.contextPath}/User/Secretary">Secrétaire</a>
			    					</c:when>
			    				</c:choose>
			    				</li>
			    				<li id="user_information"><span>${sessionScope['user'].lastname} ${sessionScope['user'].firstname}</span></li>
			    			</c:when>
			    			<c:otherwise>
			    				<li><a href="${pageContext.request.contextPath}/Connection">Connnexion</a></li>
			    			</c:otherwise>
			    		</c:choose>
			    	</ul>
			    </nav>
		    </header>
		    <div id="body">
		      <jsp:doBody/>
		    </div>
		    <footer id="main_footer">
		      <p>Site créé par Mikaël Capelle et Guilhem Desq. </p>
		    </footer>
		</div>
 	</body>
</html>
